<?php
class User_AdminController extends My_Controller_Admin
{
   // public $sh_ajaxian = array('index' , 'edit' , 'save' , 'delete');
    public function init ()
    {
        $this->UsersModel = new User_Model_Users();
    }
    /** User management Actions */
    public function indexAction ()
    {
        $users = $this->UsersModel->fetchLatest();
        $this->view->users = $users;
        //$this->renderScript('admin/index.phtml');
    }
//    public function editAction ()
//    {
//        $RoleModel = new User_RoleModel();
//        $this->view->roles = $RoleModel->fetchAll();
//        $this->view->user = $this->UserModel->read($this->getParam('id'));
//    }
//    public function saveAction ()
//    {
//        if (! empty($this->params['user']['password']))
//            $this->params['user']['password'] = md5($this->params['user']['password']);
//        else
//            unset($this->params['user']['password']);
//        $this->UserModel->save($this->params['user']);
//        $this->indexAction();
//    }
//    public function deleteAction ()
//    {
//        $this->UserModel->delete($this->params['id']);
//        $this->indexAction();
//    }
//    public function publishAction ()
//    {
//        $value = $this->UserModel->togglePublish($this->params['id']);
//        $this->_helper->json->sendJson(array('val' => $value , 'id' => $this->params['id']));
//    }
}